DevJourney
Home
/
Python
/
VIT
/
sem-1
/
ex-07
/
6. Sum of numbers upto n
/
for.py
Python/VIT/sem-1/ex-07/6. Sum of numbers upto n/for.py
n =
int
(
input
(
"Enter a number: "
)) s =
0
for
i
in
range
(
1
, n +
1
): s += i
print
(s)
View on GitHub